package cn.itsource.controller.app;


import cn.dev33.satoken.annotation.SaIgnore;
import cn.itsource.pojo.ro.CustomerWxChatRegisterRo;
import cn.itsource.result.JSONResult;
import cn.itsource.service.ICustomerService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;

@Tag(name = "客户",description = "客户")
@RestController
@RequestMapping("/app/customer")
public class AppCustomerController {

    @Autowired
    public ICustomerService customerService;

    @Operation(summary = "保存Customer", description = "基础对象保存接口")
    @Parameter(name = "customer", description = "保存的对象", required = true)
    @PostMapping
    @SaIgnore
    public JSONResult wxChatRegister(@RequestBody @Valid CustomerWxChatRegisterRo registerRo) {
        return customerService.wxChatRegister(registerRo);
    }
}
